/**
 * Create by CaoWenjian
 *
 * @copyRight: 2018
 **/
package com.bjboot.caocao.common.exception;

/**
 *@Description 自定义运行时异常信息
 *@Author 操文健
 *@Date 2018-09-03 下午7:09
 *@Version 1.0
 **/
public class BJException extends RuntimeException{
    private static final long serialVersionUID = 1L;

    private String msg;
    private int code = 500;

    // 重写构造函数
    public BJException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public BJException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public BJException(String msg, int code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public BJException(String msg, int code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
